package net.sf.midollo.midlet.common;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.Displayable;

public class CommandEvent {

  public Command command;
  public Displayable displayable;

  public void set(Command command, Displayable displayable) {
    this.command = command;
    this.displayable = displayable;
  }

  public void copy(CommandEvent commandEvent) {
    this.command = commandEvent.command;
    this.displayable = commandEvent.displayable;
  }

  public boolean equals(Command command, Displayable displayable) {
    return this.command == command && this.displayable == displayable;
  }

  public boolean equals(Command command) {
    return this.command == command;
  }

  public boolean equals(Displayable displayable) {
    return this.displayable == displayable;
  }
}
